flowchart TD
TE["转座元件 / transposable elements"] --> C1["Class I 逆转录转座子<br/>copy and paste"]
TE --> C2["Class II DNA 转座子<br/>cut and paste"]
C1 --> LTR["LTR 型<br/>Ty1/copia · Ty3/gypsy · ERV"]
C1 --> NL["非 LTR 型<br/>LINE(ORF1/ORF2)· SINE(Alu)"]
C2 --> TIR["TIR 型<br/>hAT · CACTA · Tc1/mariner · PIF/Harbinger"]
C2 --> HEL["Helitron<br/>rolling circle"]
TIR --> MITE["MITE<br/>非自主,靠 TIR + TSD"]
TE --> SAT["串联重复<br/>卫星 · rDNA · 端粒"]
本文由 AI(Trae Agent) 检索、整理并撰写,尚未经过人工逐条校对。需要特别说明一件事:本文没有在本机运行任何一个 TE 分析工具,所以没有任何跑分、没有 F1、没有内存对比。文中所有统计图都把下面那张 41 个工具的目录当作数据集来画(年份、语言、输入类型、输出分辨率),每个数字都能由文末的 R 代码从 catalog.csv 重算;工具的算法描述来自各自论文与文档,年份、语言、DOI 可能有误,发现请指出。TE 占比这类数字随所用库与版本变化,正文给的是文献里的量级,不是本机测量值。
This article was researched and written by an AI system (Trae Agent) and has not been proofread line by line by a human. One thing needs stating up front: no TE tool was run on this machine, so there are no benchmarks, no F1 scores and no memory comparisons here. Every figure treats the catalogue of 41 tools below as a data set (year, language, input, output resolution), and every number can be recomputed from catalog.csv with the R code at the end. Algorithm descriptions come from the papers and documentation of each tool; years, languages and DOIs may contain errors. TE fractions change with the library and its version, so numbers in the prose are orders of magnitude from the literature, not measurements.
写一篇中英双语长文,全面总结并对比当前领域里对基因组或测序数据做转座子(TE)与重复序列分析的工具。必须讲清:为什么这件事重要;每条技术路线(同源、从头、结构、分类、定量、插入检测、卫星)具体怎么实现;每个工具用什么语言写;给大量可视化与表格;参考文献齐全。不许编造跑分,不许凭记忆写 DOI;不确定的只给作者年份或仓库。
A long bilingual review of the tools currently used for transposable element (TE) and repeat analysis on genomes and sequencing data. It must explain why the problem matters, how each technical route works (homology, de novo, structure, classification, quantification, insertion detection, satellites), what language each tool is written in, with plenty of figures and tables and a full reference list. No invented benchmarks; no DOIs from memory; when unsure, give only author-year or the repository.
1. 从零开始:DNA、基因与基因组 / From zero: DNA, genes and genomes
最小的事实:DNA 是一串由四种碱基组成的线性文本,字母表只有 {A, C, G, T}。人类基因组单倍体约 31 亿个字母(3.1 Gbp);每个碱基沿 B 型螺旋上升约 0.34 纳米,所以一套染色体拉直后约 1 米,二倍体细胞里约 2 米,而细胞核直径只有 6 微米。
The smallest fact: DNA is a linear text over a four-letter alphabet, {A, C, G, T}. The human genome is about 3.1 billion letters per haploid copy (3.1 Gbp); each base rises ~0.34 nm along the B-form helix, so one haploid set is about a metre long, a diploid cell holds about two metres, and the nucleus is six micrometres across.
基因是这段文本里能被读出来的一段:蛋白编码基因先转录成 RNA,再翻译成蛋白;也有不编码蛋白、本身就有功能的 RNA 基因。人类只有约 2 万个蛋白编码基因,外显子加起来不到基因组的 2%。剩下的 98% 曾被称为「垃圾 DNA」,后来发现大部分有调控、结构或演化功能——其中最大的一块,就是本文的主角。
A gene is a stretch of that text that gets read out: a protein-coding gene is transcribed into RNA and then translated; there are also RNA genes that function without translation. Humans have only about 20,000 protein-coding genes, whose exons add up to under 2% of the genome. The remaining 98% was once called “junk DNA”; much of it turned out to be regulatory, structural or evolutionary — and the largest block of it is the subject of this article.
测序解决的是「怎么把这段文本读出来」。机器一次只能读一小段:二代测序(Illumina)读 100–300 bp,三代测序(PacBio、Oxford Nanopore)读 10–100 kb。把许多读段(read)拼回基因组叫组装(assembly),把读段放回一条已知的参考基因组上叫比对(alignment)。参考基因组不是某个人的完整序列,而是一条代表性序列——这正是重复序列最容易出问题的地方。
Sequencing is the problem of reading that text. Machines read one fragment at a time: short-read sequencing (Illumina) gives 100–300 bp, long-read sequencing (PacBio, Oxford Nanopore) gives 10–100 kb. Piecing many reads back into a genome is assembly; putting reads onto a known reference genome is alignment. A reference genome is not one person’s complete sequence but a representative one — which is exactly where repeats cause trouble.
2. 从零开始:什么是重复序列 / From zero: what a repeat is
「重复序列」就是基因组里同一段(或非常相似的)序列出现了多次。按排列方式只有两类,而这两类的算法后果完全不同。
A “repeat” is a sequence that occurs more than once, or in many similar copies. There are only two arrangements, and their algorithmic consequences are completely different.
第一类是串联重复(tandem repeat):拷贝首尾相接,像 ATATATAT…。按重复单元长度分:1–6 bp 的叫微卫星(microsatellite / STR),几十 bp 的叫小卫星,上百到上千 bp、成串可达几兆碱基的叫卫星 DNA(satellite),着丝粒的 alpha satellite 属于这一类;核糖体 RNA 基因成百上千拷贝串成簇(rDNA);染色体末端的端粒是 TTAGGG 重复几千次。串联重复的特点是「周期 × 拷贝数」,它不破坏序列的唯一性,但会让比对器在周期性上打滑。
The first is the tandem repeat: copies head-to-tail, like ATATATAT…. By unit length: 1–6 bp units are microsatellites (STRs), tens of bp are minisatellites, hundreds to thousands of bp in arrays up to megabases are satellite DNA — the alpha satellites of centromeres belong here; ribosomal RNA genes sit in tandem arrays of hundreds of copies (rDNA); telomeres are TTAGGG repeated thousands of times. What characterises a tandem repeat is “period × copy number”: it does not destroy uniqueness so much as make aligners slip on the periodicity.
第二类是散在重复(interspersed repeat):同一段序列散落在各处,拷贝彼此不相邻。这一类就是转座元件(transposable element, TE),也叫「跳跃基因」。它们约占人类基因组的一半,是本文真正要讨论的东西。
The second is the interspersed repeat: the same sequence scattered around, copies not adjacent. These are transposable elements (TEs), “jumping genes”. They make up roughly half of the human genome and are what this article is really about.
TE 的生物学机制只有两条。Class I 逆转录转座子走「复制—粘贴」:元件转录成 RNA,由自己编码的逆转录酶反转录成 DNA,再插到新位置;原来的拷贝留着,所以拷贝数只增不减。Class II DNA 转座子走「剪切—粘贴」:转座酶把元件切下来插到别处;拷贝数不变,位置变了。变种是 Helitron,用滚环复制,只复制一条链。
TEs have only two mechanisms. Class I retrotransposons use copy-and-paste: the element is transcribed into RNA, its own reverse transcriptase turns that RNA back into DNA, and the DNA is inserted elsewhere; the original copy stays, so copy number only grows. Class II DNA transposons use cut-and-paste: a transposase excises the element and inserts it elsewhere; the copy number stays, the position changes. The variant is the Helitron, which replicates by rolling circle and copies one strand only.
三个必须懂的名词。自主 / 非自主:自主元件自带酶(LINE 带 ORF1/ORF2,DNA 转座子带转座酶),非自主元件丢了酶,只能借用别人的机器;人类最成功的非自主元件是 Alu(约 300 bp,约 110 万个拷贝,占基因组约 11%),它借的是 LINE 的 ORF2。共识 / 家族 / 亚家族:一个家族的全部拷贝都是同一祖先的突变后代,对齐后得到一条「共识序列」;「Alu 家族」指的是这条共识,不是某个具体拷贝,越像共识的拷贝通常越年轻。TSD(目标位点重复):插入时在两侧留下的 4–20 bp 重复,是「这里插入过东西」的化石证据;LTR 元件两侧还有一对长末端重复,两者之间发生同源重组就会留下一个「单独 LTR(solo LTR)」。
Three terms you need. Autonomous vs non-autonomous: autonomous elements carry their own enzymes (LINEs carry ORF1/ORF2, DNA transposons a transposase), while non-autonomous ones have lost them and borrow someone else’s machinery; the most successful human non-autonomous element is Alu (~300 bp, ~1.1 million copies, ~11% of the genome), which borrows LINE’s ORF2. Consensus / family / subfamily: all copies of a family are mutant descendants of one ancestor, and aligning them gives a “consensus sequence”; the “Alu family” means that consensus, not any single copy, and copies closer to the consensus are usually younger. TSD (target site duplication): the 4–20 bp duplication left on both flanks at insertion, fossil evidence that something landed here; LTR elements also carry a pair of long terminal repeats, and homologous recombination between them leaves a “solo LTR”.
给个尺度:人类基因组里 LINE 约 17%(L1 约 50 万个拷贝,真正还会跳的不到 100 个),Alu 约 11%,LTR 元件约 8%,DNA 转座子约 3%,加上卫星与其它,合计约一半[2]。玉米与小麦更高,约 85%——玉米基因组在几百万年里被 TE 撑大了一倍[5]。
For scale: LINEs are ~17% of the human genome (about 500,000 L1 copies, fewer than 100 still active), Alu ~11%, LTR elements ~8%, DNA transposons ~3%; with satellites and the rest, about half [2]. Maize and wheat go higher, near 85% — the maize genome roughly doubled in size within a few million years because of TEs [5].
3. 为什么值得研究 / Why it matters
三条生物学理由,加一条工程理由。
Three biological reasons, plus one engineering reason.
演化:基因组大小与生物复杂度不成正比(洋葱的基因组比人的大五倍),这个「C 值悖论」的主要解释就是 TE 的扩增与删除。TE 是基因组可塑性的发动机:它们带来新的调控序列、新的剪接位点、新的外显子,也带来不等交换与缺失。
Evolution: genome size does not track organismal complexity (an onion genome is five times the human one), and the main explanation for this “C-value paradox” is TE expansion and deletion. TEs are the engine of genome plasticity: they bring new regulatory sequences, splice sites and exons, and they also bring unequal crossing-over and deletions.
功能:宿主并不是被动地被寄生。演化把 TE 驯化成了自己的零件:哺乳动物胎盘的合胞体蛋白来自一个 ERV 的包膜基因;RAG1/RAG2(V(D)J 重组的核心)来自一个 Transib 转座子;许多干扰素诱导的增强子是 MER41 这类 ERV 的 LTR。另一面是防御:生殖细胞用 piRNA 把 TE 的转录压住,这条通路本身就是军备竞赛的产物。
Function: the host is not passively parasitised. Evolution domesticates TEs into its own parts: the syncytins of the mammalian placenta come from an ERV envelope gene; RAG1/RAG2, the core of V(D)J recombination, come from a Transib transposon; many interferon-induced enhancers are LTRs of ERVs such as MER41. The other side is defence: germ cells silence TE transcription with piRNAs, a pathway that is itself a product of the arms race.
医学:L1 在肿瘤里重新活跃,造成插入突变与基因组不稳定;Alu 之间的同源重组造成致病的大片段缺失(例如 NF1 微缺失);插入突变约占人类致病突变的千分之一量级;神经发育中的 L1 体细胞插入让每个神经元的基因组都略有不同。反过来,TE 也是工具:Sleeping Beauty、piggyBac、Tol2 是常用的基因递送载体。
Medicine: L1 reactivates in tumours, causing insertional mutations and genome instability; recombination between Alus causes pathogenic large deletions (the NF1 microdeletion, for instance); insertional mutations account for on the order of a tenth of a percent of human disease alleles; and somatic L1 insertions during neurodevelopment make every neuron’s genome slightly different. Conversely, TEs are tools: Sleeping Beauty, piggyBac and Tol2 are standard gene-delivery vectors.
工程:这是本文的落脚点。重复序列让所有「把读段放回基因组」的步骤变脏——比对器给出 MAPQ 0,变异检测漏报或错报,表达定量把多映射读段随便分给某个拷贝,组装在重复区塌缩。T2T 组装之前,人类参考基因组缺的 8% 几乎全是这些区域[7,8]。所以重复序列分析不是冷门方向,而是任何基因组学流程都必须过的一关。
Engineering: this is the point of the article. Repeats contaminate every step that puts a read back on the genome: aligners emit MAPQ 0, variant callers miss or invent calls, expression quantification hands multi-mapping reads to an arbitrary copy, assemblies collapse in repeat regions. Before T2T, the 8% missing from the human reference was almost entirely these regions [7,8]. Repeat analysis is therefore not a niche; it is a gate every genomics pipeline has to pass.
4. 计算机视角:为什么这件事难 / The computer-science view
换成算法语言:基因组是一个长度 \(3.1\times10^9\) 的字符串 \(S\),读段是它的一个带错误的子串,比对就是「允许错配的子串搜索」。为了不每次从头扫 31 亿个字符,工具建索引——后缀数组、FM-index,或者 k-mer 哈希表(把每个长度 \(k\) 的短词映射到它出现的位置)。k-mer 是这一行的基本单位:\(k=21\) 时有 \(4^{21}\approx4.4\times10^{12}\) 种可能,足够把绝大多数短词唯一化。
In algorithmic terms: the genome is a string \(S\) of length \(3.1\times10^9\), a read is a substring of it with errors, and alignment is “substring search allowing mismatches”. To avoid scanning 3.1 billion characters every time, tools build indexes — suffix arrays, FM-indexes, or hash tables of k-mers (mapping every word of length \(k\) to the positions where it occurs). The k-mer is the unit of this trade: at \(k=21\) there are \(4^{21}\approx4.4\times10^{12}\) possible words, enough to make almost every short word unique.
重复序列在这个框架里制造三种彼此独立的代价。
Repeats create three independent costs in this framework.
第一,搜索空间膨胀。 一条完全落在某个家族内部的读段,和该家族的每一个拷贝都完美匹配。人类有 110 万个 Alu 拷贝,一条纯 Alu 读段就有 110 万个等价落点。比对器只能挑一个,并把 MAPQ 置 0 表示「不可信」;而下游软件经常不看 MAPQ。
First, the search space explodes. A read lying entirely inside a family matches every copy of that family perfectly. With 1.1 million Alu copies, a pure Alu read has 1.1 million equally good placements. The aligner picks one and sets MAPQ 0 meaning “do not trust this” — and downstream software frequently ignores MAPQ.
第二,索引与内存。 31 亿个碱基按 2 bit 存是 750 MB;但一个 31-mer 索引每条要 8 字节以上,动辄几十 GB。于是有了压缩:minimizer 只采样一部分 k-mer(每 \(w\) 个窗口取最小的那个,索引缩小约 \(w\) 倍),FM-index 把后缀数组压到每碱基约 1 字节。你在工具参数里看到的 -w 10 -k 19 就是这两个数字。三代数据更极端:30× 覆盖的人基因组是 900 亿个碱基的读段,所以长读段工具几乎都用 minimizer 而不用全 k-mer 表。
Second, index and memory. 3.1 billion bases at 2 bits is 750 MB; but a 31-mer index costs 8+ bytes per entry and easily runs to tens of GB. Hence compression: minimizers sample only some k-mers (the smallest in every window of \(w\), shrinking the index by about \(w\)), and FM-indexes compress the suffix array to roughly a byte per base. The -w 10 -k 19 you see in tool flags are exactly these two numbers. Long-read data is more extreme: a 30× human genome is 90 billion bases of reads, which is why long-read tools almost always use minimizers rather than full k-mer tables.
第三,统计上的不可辨识。 就算你愿意枚举所有落点,问题仍然欠定:一条读段的来源在数学上不唯一,任何「分配」都是模型假设。这就是为什么表达定量分「家族级」与「位点级」,而后者只能靠 EM 这类概率模型给后验——它不是一个观测值。
Third, statistical non-identifiability. Even if you enumerate every placement, the question stays under-determined: a read’s origin is not unique, so any “allocation” is a model assumption. That is why expression quantification splits into family level and locus level, and why the latter can only be a posterior from something like EM — not an observation.
这三种代价对应三类解法,也正是后面所有工具的分类:换索引(更快的比对器)、换搜索(用结构签名直接找元件,不必逐条比对)、换问题(放弃位点级只报家族级,或者用长读段让位点变得唯一)。记住这句话,后面每看一个工具,先问它换的是哪一个。
These three costs map onto three families of cures, which is exactly the taxonomy of every tool that follows: change the index (a faster aligner), change the search (find elements by structural signature instead of pairwise alignment), change the question (give up locus resolution and report families, or use long reads so that loci become unique). Keep that sentence in mind: for each tool below, ask which one it changed.
5. 先分类,再谈工具 / Classify first, then choose a tool
所有工具都建立在同一套分类上:Wicker 等人 2007 年提出的统一分类系统[1]。它按转座机制分两大类,再按结构特征分目与超科。分类不是学术洁癖——每一种类型都有自己可被算法捕捉的「签名」,工具之间真正的差别,是它们各自认哪几种签名。
Every tool rests on the same taxonomy: the unified classification of Wicker et al. 2007 [1]. It splits by mechanism into two classes, then by structural signature into orders and superfamilies. The taxonomy is not pedantry — each class has a signature an algorithm can detect, and the real difference between tools is which signatures they recognise.
每种签名对应一组可检测的特征:LTR 型有两端长末端重复 + 引物结合位点(PBS)+ 多嘌呤 tract(PPT)+ 目标位点重复(TSD);TIR 型有末端反向重复 + TSD;Helitron 有5′ 端的 TC 与 3′ 端的 CTAG 发夹;SINE 有tRNA 来源的头部(A box / B box)+ 3′ 尾;LINE 有ORF1/ORF2 结构域 + poly-A。结构驱动的工具就是在序列里找这些特征的组合,同源驱动的工具则是把序列拿去和已知家族比对。
Each signature maps to a set of detectable features: LTR elements carry two long terminal repeats plus a primer binding site (PBS), a polypurine tract (PPT) and a target site duplication (TSD); TIR elements carry terminal inverted repeats plus a TSD; Helitrons carry a 5′ TC and a 3′ CTAG hairpin; SINEs carry a tRNA-derived head (A box / B box) and a 3′ tail; LINEs carry ORF1/ORF2 domains and a poly-A tail. Structure-based tools look for combinations of these features; homology-based tools search a known family library instead.
6. 三条技术路线 / Three technical routes
第 4 节说重复序列带来三种代价,三条路线就是三种「换」的具体做法:同源比对是换掉搜索空间(拿一条库当索引,不再逐条比对全基因组),从头发现是换掉唯一性假设(不问「这条读段属于哪里」,只问「哪些片段过量」),结构特征则是换掉比对本身(直接找签名,根本不搜索)。三者赌的东西不同,所以失败方式也不同。
Section 4 named three costs; the three routes are three concrete ways of “changing” something. Homology changes the search space (use a library as the index instead of aligning against the whole genome), de novo changes the uniqueness assumption (never ask “where does this read belong”, only “which fragments are over-represented”), and structure changes the act of comparison (look for a signature directly, without searching at all). They bet on different things, so they fail differently.
| 路线 | 假设 | 输入 | 强项 | 弱项 |
|---|---|---|---|---|
| 同源比对 / homology | 已知家族库足够全 | 组装 + 库 | 边界准、可给 divergence | 库外的一律漏掉 |
| 从头发现 / de novo | 重复会在序列里留下过量片段 | 组装或读段 | 能发现库里没有的家族 | 共识易嵌合、易过度拆分 |
| 结构特征 / structure | 类型有可检测的结构签名 | 组装 | 不需要库、灵敏度高 | 假阳性多、需二次过滤 |
三条路线不是互斥的,现代流水线基本都是混合体:EDTA 用结构工具找 LTR/TIR/Helitron、用 RepeatModeler 兜底,再统一过滤[22];Earl Grey 与 McClintock 同样把三类证据拼起来[44,45]。理解路线的意义在于:当你看到一个「TE 占比」的数字,先问它是哪条路线、哪个库算出来的——三者能差出十个百分点。
The three routes are not exclusive; modern pipelines are hybrids. EDTA calls LTR, TIR and Helitron structurally, falls back on RepeatModeler for the rest, then filters globally [22]; Earl Grey and McClintock splice the same three kinds of evidence [44,45]. The point of knowing the routes is that when you see a “TE fraction”, you should ask which route and which library produced it — they can differ by ten percentage points.
7. 同源注释:RepeatMasker 与它的库 / Homology: RepeatMasker and its libraries
RepeatMasker 是这个领域的地基,1996 年至今仍在维护(https://www.repeatmasker.org)。它的实现是「搜索 + 分类」两步:先把序列与一个重复库做局部比对,再把每个命中归到库里最相似的那条记录上。搜索引擎可以换:最早的 cross_match 是 Smith-Waterman,后来加入 RMBlast(针对重复序列调过参数的 NCBI BLAST),再后来加入 nhmmer,可以直接搜 Dfam 的 HMM 模型[12]。输出 .out(逐条比对)、.gff、.masked(软屏蔽或硬屏蔽序列)、.tbl(按家族汇总)。
RepeatMasker is the foundation of the field and has been maintained since 1996 (https://www.repeatmasker.org). Its implementation is “search, then classify”: align the sequence locally against a repeat library, then assign each hit to the most similar record. The search engine is swappable: the original cross_match is Smith-Waterman, RMBlast is an NCBI BLAST tuned for repeats, and nhmmer searches the HMM profiles of Dfam directly [12]. It writes .out (per-hit alignments), .gff, .masked (soft- or hard-masked sequence) and .tbl (per-family summary).
两个库决定了它的上限。Dfam 用 profile HMM 描述家族,适合远缘与短片段;Repbase 是历史最久的收集,但近年已不再免费公开发布新版本,这直接导致老流程不可复现。所以任何认真的项目都会先建一个物种特异库,而那需要第 8 节的方法。
Two libraries set its ceiling. Dfam describes families as profile HMMs, which suits diverged and short fragments; Repbase is the oldest collection but no longer distributes new releases freely, which is exactly why old pipelines are hard to reproduce. Any serious project therefore builds a species-specific library first — and that needs the methods of section 8.
RepeatMasker 还附带一个被低估的功能:divergence landscape。calcDivergenceFromAlign.pl 把每条比对换算成 Kimura 二参数距离(并做 CpG 校正),createRepeatLandscape.pl 再把「各家族在不同 divergence 区间的基因组占比」画成曲线。横轴是从现在往回的时间,纵轴是量——曲线的峰就是一次爆发。这张图是整个 TE 领域最有信息量的单张图,因为它同时告诉你「有什么」和「什么时候进来的」。
RepeatMasker ships an underrated feature: the divergence landscape. calcDivergenceFromAlign.pl converts each alignment into a Kimura two-parameter distance (with CpG correction), and createRepeatLandscape.pl plots the genome fraction of each family against divergence. The x axis is time going backwards, the y axis is amount — a peak is a burst. It is the single most informative plot in the field, because it answers “what is there” and “when did it arrive” at once.
8. 从头发现:没有库怎么办 / De novo discovery
当物种没有像样的库时,只能从序列自身把重复「找出来」。四种经典算法的差别在于用什么统计量定义「过量」:
When a species has no decent library, repeats have to be recovered from the sequence itself. The four classic algorithms differ in what statistic defines “over-represented”:
- RepeatScout:数 \(l\)-mer(默认 \(l = 15\)),保留出现次数显著高于随机期望的,从这些种子向两侧贪心延伸,直到频率掉下来,最后多序列比对出共识。快、简单,但对低拷贝家族不敏感[14]。
Counts \(l\)-mers (default 15), keeps those far above the random expectation, extends each seed greedily to both sides while it stays frequent, then builds a consensus by multiple alignment. Fast and simple, but blind to low-copy families. - RECON:先做全基因组自比对,再用单链接聚类把命中连成家族,然后检测每个家族的 3′ 端、做多序列比对。它的家族定义更接近生物学[15]。
Self-aligns the genome, links hits into families by single-linkage clustering, then finds 3′ ends and builds alignments. Its families look more biological. - Piler:为基因组建后缀数组,找极大精确重复,过滤掉低复杂度和嵌套的,再聚类成家族。理论最干净,内存最贵[16]。
Builds a suffix array of the genome, finds maximal exact repeats, filters low-complexity and nested ones, then clusters into families. Theoretically cleanest, most memory-hungry [16]. - RepeatExplorer2:完全不用参考基因组——把低覆盖度读段做成 k-mer 相似性图,图里的连通分量就是重复家族,再按蛋白结构域注释。对超大基因组特别有用[51]。
Needs no reference at all: builds a k-mer similarity graph over low-coverage reads, takes connected components as repeat families, then annotates by protein domain. Especially useful for huge genomes.
RepeatModeler2 本身不是新算法,而是编排:对基因组抽样,分别跑 RECON、RepeatScout 与 LTR 结构发现,把结果合并去冗余,最后用 RepeatClassifier 按 Dfam/RepeatPeps 的 HMM 给每个共识打上 class/family 标签[13]。它 2020 年的改进主要在合并策略与 LTR 处理,产出的 consensi.fa.classified 就是喂给 RepeatMasker 的库。EDTA 把同样的思路推到极限:TIR-Learner 找 TIR、HelitronScanner 找 Helitron、LTRharvest + LTR_retriever 找 LTR、RepeatModeler 兜底,然后做一次全基因组结构验证来剔除假阳性,最后输出非冗余库 + GFF[22]。
RepeatModeler2 is not a new algorithm but an orchestration: sample the genome, run RECON, RepeatScout and structural LTR discovery, merge and de-duplicate, then label every consensus with RepeatClassifier against Dfam/RepeatPeps HMMs [13]. Its 2020 gains are mostly in merging and LTR handling; the output consensi.fa.classified is exactly the library RepeatMasker wants. EDTA pushes the same idea to its limit: TIR-Learner for TIRs, HelitronScanner for Helitrons, LTRharvest + LTR_retriever for LTRs, RepeatModeler for the remainder, then a whole-genome structural validation pass to remove false positives, and finally a non-redundant library plus GFF [22].
flowchart LR
G["基因组 / assembly"] --> T["TIR-Learner"]
G --> H["HelitronScanner"]
G --> L["LTRharvest + LTR_retriever"]
G --> R["RepeatModeler2"]
T --> M["合并 + 全基因组验证<br/>merge and validate"]
H --> M
L --> M
R --> M
M --> LIB["非冗余库 / EDTA.TElib.fa"]
LIB --> RM["RepeatMasker"]
RM --> OUT["GFF3 + 家族统计 + landscape"]
这类流水线共同的软肋是共识质量:从头拼出来的共识可能把两个相邻的不同元件粘成一条(嵌合),也可能把一个家族拆成十几条(碎片化)。前者让 RepeatMasker 报出根本不存在的家族,后者让「家族数」这个统计量失去意义。所以 EDTA、Earl Grey 都保留了人工审阅与 curated library 的接口。
The shared weakness of these pipelines is consensus quality: a de novo consensus can glue two adjacent elements into one (chimera), or split one family into a dozen (fragmentation). The first makes RepeatMasker report families that never existed; the second makes “number of families” meaningless. Both EDTA and Earl Grey therefore keep an interface for manual review and a curated library.
9. 结构驱动:把签名写成算法 / Structure-driven: signatures as algorithms
结构工具不依赖库,只依赖签名,因此灵敏度高、假阳性也高。
Structural tools depend on signatures rather than libraries, which buys sensitivity at the cost of false positives.
- LTRharvest(GenomeTools 的一部分,C 实现):在序列里找一对完全相同的 30-mer,要求方向相同、距离在 1–15 kb 之间;以此为种子向两侧延伸成候选 LTR;再检查 TSD(4–6 bp 正向重复)、PPT 与 PBS。整个过程走后缀索引,速度极快[17]。
Finds a pair of identical 30-mers in the same orientation 1–15 kb apart, extends them into candidate LTRs, then checks for a TSD (4–6 bp), a PPT and a PBS. It runs on a suffix index and is very fast [17]. - LTR_FINDER:思路类似但用比对而非精确种子,低相似度的 LTR 也能抓到,代价是慢[18]。
Similar idea but seeded by alignment rather than exact matches, so it catches diverged LTRs at the cost of speed [18]. - LTR_retriever:不发现,只做质检。它把 LTRharvest / LTR_FINDER 的候选拿来做严格过滤(两端 LTR 一致性、TSD、PPT、PBS、蛋白结构域),去冗余后重定边界,并顺带算出 LAI(LTR Assembly Index)——一个用 LTR 完整度衡量组装连续性的指标[21]。
It does not discover, it audits: takes LTRharvest/LTR_FINDER candidates, filters hard (LTR identity, TSD, PPT, PBS, protein domains), de-redundifies, redefines boundaries, and computes LAI, an assembly-continuity metric derived from LTR completeness [21]. - TIR-Learner:找末端反向重复对 + TSD,再用机器学习分类器把真正的 TIR 转座子与其它重复分开[23]。
Finds inverted-repeat pairs plus TSDs, then uses a machine-learning classifier to separate true TIR transposons from other repeats [23]. - HelitronScanner:把 5′ 端与 3′ 端分别用两个 SVM 识别(输入是「局部组合变量」编码),再把两端配对成元件[24]。
Recognises 5′ and 3′ ends with two separate SVMs over a “local combinational variable” encoding, then pairs the ends into elements [24]. - SINE_Scan:利用 SINE 的 tRNA 来源头部(A box / B box)与 3′ 端相似性成对搜索[25]。
Exploits the tRNA-derived head (A box / B box) and 3′ similarity of SINEs, searching the two ends as a pair [25].
结构工具的通病是过调用:LTRharvest 默认会报出大量「有 LTR 但没有内部结构」的候选,TIR-Learner 的原始输出也远多于真实元件。所以这一层的正确用法几乎总是「先放宽阈值拿候选,再用 LTR_retriever 或人工规则收紧」。这条经验在 EDTA 的设计里被写死:结构工具只负责提议,过滤器负责裁决。
The shared flaw of structural tools is over-calling: LTRharvest reports many candidates with LTRs but no internal structure, and raw TIR-Learner output far exceeds real elements. The correct use of this layer is therefore almost always “loosen the threshold to collect candidates, then tighten with LTR_retriever or manual rules”. EDTA hard-codes this lesson: structural tools propose, filters decide.
10. 分类器:这一步最不可靠 / Classifiers: the weakest link
拿到共识序列之后,还要回答「它属于哪一类」。三条实现路线:
Once a consensus exists, the next question is “what class is it”. Three implementations:
- PASTEC:把结构特征(LTR、TIR、TSD、PBS、poly-A、ORF 结构域)喂进一棵人工写的决策树,输出 Wicker 分类[26]。可解释性最好,覆盖不了树外的情况。
Feeds structural features (LTR, TIR, TSD, PBS, poly-A, ORF domains) into a hand-written decision tree that emits a Wicker class [26]. Maximally interpretable, and blind to anything outside the tree. - TEclass:在 \(k\)-mer 频率上训练 SVM,分到 DNA / LTR / LINE / SINE 四类[27]。训练集小,只能到「目」这一层。
Trains an SVM on \(k\)-mer frequencies into DNA/LTR/LINE/SINE [27]. Small training set; only reaches order level. - TERL / DeepTE / TransposonUltimate:把 \(k\)-mer 谱当成一维信号或图片,用卷积网络分类[28,29,30]。DeepTE 支持在自有标签上微调;TransposonUltimate 把 TERL 的 CNN 与一个基于结构特征的随机森林(RFSB)集成起来,再套一层 RepeatMasker 做检测。
Treat the \(k\)-mer spectrum as a 1-D signal or an image and classify with a CNN [28,29,30]. DeepTE can be fine-tuned on your own labels; TransposonUltimate ensembles TERL’s CNN with a random forest over structural features (RFSB) and wraps a RepeatMasker detection layer around it.
分类之所以最不可靠,有三个结构性的原因:训练标签本身来自 Repbase,带着它的偏差;类别极不平衡(LTR 与 DNA 转座子样本远多于其它);以及大量真实元件是非自主的,只剩两端签名,任何基于内部结构的分类都会失效。实践中的处理是:分类只当参考,家族名手工审;对非自主元件(MITE、SINE)单独用结构工具。
Classification is the weakest link for three structural reasons: the training labels come from Repbase and inherit its biases; classes are severely imbalanced (LTR and DNA transposons dominate); and many real elements are non-autonomous, retaining only their terminal signatures, which defeats any classifier built on internal structure. In practice: treat the class as a hint, curate family names by hand, and use structural tools separately for non-autonomous elements (MITEs, SINEs).
11. 从基因组到转录组:表达定量 / From genome to transcriptome
第二大类问题不是「在哪里」,而是「表达多少」。这一层全部围绕同一个数学困难:一条落在重复内部的读段,可能来自几千个位点,如何分配决定了你能得到什么。
The second big question is not “where” but “how much”. This layer is entirely about one mathematical difficulty: a read inside a repeat may come from thousands of loci, and how you allocate it decides what you can estimate.
- TEtranscripts / TEcount(Python):读 BAM,分别对基因注释与 TE 注释计数;多映射读段先给基因,剩下的给 TE;
--mode multi用 EM 迭代分配[31]。输出可直接进 DESeq2。
Read a BAM, count against gene and TE annotation separately; multi-mapping reads go to genes first, then to TEs;--mode multiallocates them by EM [31]. The output feeds straight into DESeq2. - TEtools(R):把读段比对到 TE 库、按家族汇总,剩下的差异分析在 R 里做[32]。
Maps reads to a TE library, sums by family, and does the differential analysis in R [32]. - SalmonTE(Python):把每个亚家族当成一条转录本,用 salmon 的准比对做定量,因此极快;代价是只到亚家族级[33]。
Treats each subfamily as a transcript and quantifies with salmon’s quasi-mapping, hence very fast; the price is subfamily-only resolution [33]. - SQuIRE(Python):在 TE 共识两侧加「唯一锚点」建索引,多映射读段用 EM 分配到具体位点,输出亚家族与位点两套计数[34]。
Indexes each TE consensus with unique genomic anchors on both sides, allocates multi-mapping reads to loci by EM, and reports both subfamily and locus counts [34]. - Telescope(Python):用一个生成模型对多映射读段做概率重分配,专门做 L1 的位点级定量[35]。
Probabilistically reassigns multi-mapping reads under a generative model, aimed at locus-level L1 quantification [35]. - REdiscoverTE(R/Bioconductor):把约 150 万个重复位点折叠到亚家族层,用 EM 定量,接口是
SummarizedExperiment[36]。
Collapses roughly 1.5 million repeat loci to subfamily level, quantifies by EM, and returns aSummarizedExperiment[36]. - scTE(Python):把同一套分配问题搬到单细胞,输出 cell × TE 矩阵,用于看 TE 表达的细胞类型特异性[37]。
Moves the same allocation problem into single cells, producing a cell × TE matrix for cell-type-specific TE expression [37]. - L1EM(Python):只做 L1,用位点特异的唯一 \(k\)-mer 加 EM,给出位点级估计[52]。
L1 only: locus-specific unique \(k\)-mers plus EM, giving locus-level estimates [52].
这里有一个必须说清的可辨识性边界:家族级(亚家族级)的表达量在数学上是可辨识的,因为同一家族的所有拷贝共享序列,读段总量就是它们的和;位点级则不可辨识,除非每个位点都有独特的锚点或杂合标记。SQuIRE 与 Telescope 给出的位点级数字,本质上是模型假设下的后验分配,不是观测。把它们当「某拷贝的表达量」用,是这一层最常见的误用。
There is an identifiability boundary worth stating plainly: family-level (subfamily-level) expression is identifiable, because all copies of a family share sequence and the reads simply sum; locus-level expression is not identifiable unless each locus carries a unique anchor or heterozygous marker. The locus-level numbers from SQuIRE and Telescope are posterior allocations under model assumptions, not observations. Treating them as “the expression of that copy” is the most common misuse in this layer.
12. 插入多态:个体之间差在哪 / Insertion polymorphism
第三个问题:这个 TE 在某个体里到底插没插进去。短读段只能靠间接信号:一头锚在唯一序列、另一头落在 TE 里的不一致读段对(discordant pair),或者跨越断点的分裂读段(split read)。
The third question: is this TE inserted in this individual or not. Short reads can only use indirect signals: discordant pairs with one end anchored in unique sequence and the other in a TE, or split reads spanning the breakpoint.
- RetroSeq(Perl):收集不一致读段对,按 TE 类型聚类,再局部重比对确认断点[39]。
Collects discordant pairs, clusters them by TE type, and confirms breakpoints by local realignment [39]. - MELT(Java):把不一致读段、分裂读段与局部组装三路证据合起来,Alu/LINE/SVA 分别建模,还能给每个插入做基因型[38]。
Combines discordant pairs, split reads and local assembly, models Alu/LINE/SVA separately, and genotypes each insertion [38]. - Mobster(Java):换一个信号——直接找目标位点重复(TSD),因此对参考基因组的依赖更小[40]。
Uses a different signal: it looks for the target site duplication (TSD) directly, and therefore depends less on the reference [40]. - PoPoolationTE2(Python):面向混池测序,用物理覆盖度的「签名」估计每个插入的群体频率[41]。
For pooled sequencing, estimating each insertion’s population frequency from physical-coverage signatures [41]. - TEMP(Python):同样面向混池,用配对读段的插入片段长度分布做最大似然估计[42]。
Also for pools, using a maximum-likelihood fit to the insert-size distribution of paired reads [42]. - TLDR(C++):长读段方案。一条读段可以直接跨过整个插入,于是「分配」问题消失,只剩比对与断点解析[43]。
The long-read answer: one read can span the whole insertion, so the allocation problem disappears and only alignment and breakpoint parsing remain [43].
长读段为什么改变游戏:短读段的插入检测本质上是统计推断(我看到了间接证据,推断这里有一个插入),长读段则是直接观测(我看到了这个插入)。代价是覆盖度与成本,以及长读段自身在高重复区的错误率。
Why long reads change the game: short-read insertion detection is statistical inference (I saw indirect evidence, so I infer an insertion), whereas long reads are direct observation (I saw the insertion). The price is coverage and cost, plus the error rate of long reads in high-repeat regions.
13. 卫星与串联重复:另一类问题 / Satellites and tandem repeats
卫星 DNA 与 TE 的数学结构不同:它不是「同一段序列散落在多处」,而是「同一段序列首尾相接重复很多次」。所以比对类工具在这里基本失效,需要的是周期性检测与同一性轨迹。
Satellite DNA differs mathematically from TEs: it is not “the same sequence scattered in many places” but “the same unit repeated head-to-tail many times”. Alignment tools fail here; what is needed is periodicity detection and identity tracks.
- TRF(C):在 Bernoulli 模型下给匹配/错配打分,先检测周期性种子,再用动态规划把每个 period 的比对延伸到最优[48]。它是所有串联重复注释的默认起点。
Scores matches and mismatches under a Bernoulli model, detects periodic seeds, then extends each period’s alignment by dynamic programming [48]. It is the default starting point for tandem repeat annotation. - StainedGlass(C++ + R):对每个重复单元计算它相对家族模型的逐碱基同一性,输出可交互的「同一性热图」,从而看清高阶重复(HOR)结构与突变梯度[46]。
Computes per-base identity of every repeat unit against a family model and emits an interactive identity heatmap, exposing higher-order repeat (HOR) structure and mutation gradients [46]. - HumAS-HMMER(Python + HMMER):用 HOR 拷贝的 HMM 库注释 alpha satellite 阵列,是 T2T 中心粒图谱的核心工具之一[47]。
Annotates alpha satellite arrays with an HMM library of HOR copies; one of the core tools behind the T2T centromere maps [47]. - ExpansionHunter(C++):把短串联重复(STR)建成图,再用读段在图上游走,输出各等位基因的长度[49]。
Builds a graph of the short tandem repeat and walks reads through it to genotype allele lengths [49].
14. 谁用什么语言写 / Who writes these tools in what
把目录按语言统计一遍,会看到一条非常清晰的时代曲线。
Count the catalogue by language and a clean era curve appears.
1996–2004 只有三件:Perl 的 RepeatMasker,加上两个 C 写的算法(RECON 与 TRF)。2005–2009 的六件全部是 C/C++ —— 那是算法年代,后缀数组、精确种子搜索、图聚类都得自己管内存。2010–2014 开始混杂。2015 年之后 Python 拿走几乎全部新工具(18 个),C/C++ 仍有 12 个守在内核(GenomeTools、TRF、RepeatMasker 的搜索器、TLDR、StainedGlass),而 Perl 退成了「胶水」:EDTA 与 RepeatModeler2 用它把 C 程序、HMMER 与 shell 脚本粘在一起(6 个)。
There were only three tools in 1996–2004: Perl’s RepeatMasker plus two C algorithms (RECON and TRF). All six tools of 2005–2009 are C/C++ — that was the algorithm era, when suffix arrays, exact-seed search and graph clustering meant managing memory yourself. 2010–2014 is mixed. After 2015 Python took nearly every new tool (18), C/C++ kept 12 in the kernel (GenomeTools, TRF, RepeatMasker’s engines, TLDR, StainedGlass), and Perl retreated into glue: EDTA and RepeatModeler2 use it to stick C programs, HMMER and shell scripts together (6).
这条曲线对使用者有一个直接后果:装一套完整的 TE 流程,等于同时维护四个生态——Perl 模块(Text::Soundex、File::Which 之类)、Python 环境(TensorFlow 版本的兼容性尤其麻烦)、Java 运行时,以及需要自己编译的 C/C++ 二进制。这不是审美问题,而是「三年后还能不能跑起来」的问题。
One practical consequence: assembling a complete TE pipeline means maintaining four ecosystems at once — Perl modules (Text::Soundex, File::Which and friends), Python environments (TensorFlow version compatibility being the worst), a Java runtime, and C/C++ binaries you compile yourself. That is not aesthetics; it is whether the thing still runs three years from now.
看时间轴能读出三条史:注释层(蓝)从 1996 一直续到今天,每次高潮都对应一次库或流水线的更新;结构层(绿)集中在 2007–2019,正好是「LTRharvest → LTR_retriever → TIR-Learner」这条改进链;表达层(橙)全部落在 2015 年之后,因为它的前提是「多映射读段可以用 EM 分配」这个想法被工程化。
Three histories are visible. The annotation layer (blue) runs from 1996 to today, with each bump matching a library or pipeline release. The structural layer (green) clusters in 2007–2019, which is exactly the LTRharvest → LTR_retriever → TIR-Learner improvement chain. The expression layer (orange) is entirely post-2015, because its precondition — that multi-mapping reads can be allocated by EM — had to be engineered first.
15. 工具的方法学地图 / A methodological map
把 41 个工具按「方法族 × 子领域」交叉,可以看清哪一格是空的。
Crossing the 41 tools by “method family × subfield” shows which cells are empty.
图里最值得注意的空格有两个。第一,注释类工具里没有一个是纯机器学习的——分类可以交给 CNN,但「这个东西在哪里、边界在哪」仍然靠比对或结构规则。第二,表达类工具里没有一个是纯结构的——它必须先把读段分配掉。这两条不是巧合,而是问题本身决定的:位置问题适合规则,数量问题适合统计。
Two empty cells are worth noting. First, no annotation tool is purely machine-learned — classification can go to a CNN, but “where is it and where does it end” still comes from alignment or structural rules. Second, no expression tool is structural — reads must be allocated first. Neither is a coincidence: placement suits rules, counting suits statistics.
16. 如果从三代测序数据重做一个工具 / If you were to build one from long reads
下面是一个设计草案,我没有实现它;但每一步都能在现有工具里找到先例,把它串起来恰好说明这个领域为什么有 41 个工具而不是一个。
Here is a design sketch that I have not implemented; every step has precedent in existing tools, and stringing them together is exactly why this field has 41 tools instead of one.
设定:输入是 PacBio HiFi 或 ONT 的长读段(10–100 kb),不做组装,直接从读段给出「这个样本里有哪些非参考的 TE 插入」。为什么值得重做:短读段的插入检测本质是间接推断,而长读段可以一条读段跨过整个插入,把推断变成观测。现有 TLDR 已经证明这条路可行,但工具仍然集中在「二倍体、人类、Alu/L1/SVA」这一格[43]。
Setup: input is PacBio HiFi or ONT long reads (10–100 kb), without assembly, and the output is “which non-reference TE insertions this sample carries”. Why rebuild: short-read insertion calling is indirect inference, while one long read can span the whole insertion and turn inference into observation. TLDR already shows the route works, but existing tools concentrate on one cell — diploid human, Alu/L1/SVA [43].
先定输出契约,再写代码。这一条比任何算法都重要:输出的每一行必须能回答「哪条染色体、什么位置、哪个家族、哪条链、TSD 是什么、几条读段支持、基因型是什么」。把它定成 BED9+ 的一张表,后面每一步都为它服务。
Define the output contract before writing code. This matters more than any algorithm: every row must answer “which chromosome, what position, which family, which strand, what TSD, how many reads support it, what genotype”. Fix it as a BED9+ table and let every step serve it.
flowchart TD
R["长读段 / long reads"] --> A["比对到软屏蔽参考<br/>minimap2 -x map-hifi"]
A --> S["拆分比对 + 软剪切<br/>得到断点候选"]
S --> C["两侧不唯一时<br/>用 TSD 与覆盖度兜底"]
C --> L["局部组装<br/>5–20 条读段的一致性"]
S --> L
L --> T["比对 TE 库<br/>家族、方向、截断"]
T --> G["基因型与单倍型<br/>ref / ins 读段计数"]
G --> OUT["BED9+ 输出"]
1)参考侧的准备。 参考基因组用软屏蔽版本(RepeatMasker 的 -xsmall,重复区小写),让比对器知道哪些区域不该给高 MAPQ;同时准备一份 TE 家族库(每条亚家族一条共识,EDTA 或 Dfam 都行)。这一步决定了「插入能被认出多少」——库外的家族只能标 unknown。
1) Prepare the reference side. Use a soft-masked reference (RepeatMasker -xsmall, repeats in lower case) so the aligner knows where not to award high MAPQ, and keep a TE family library (one consensus per subfamily; EDTA or Dfam both work). This step sets the ceiling on how many insertions can be named — families outside the library can only be “unknown”.
2)比对与候选。 长读段比对器(minimap2 的 map-hifi / map-ont)给出两类信号:拆分比对(一条读段被切成两段,分别落在同一位置的两侧,中间那段没比上)与软剪切(读段两端没比上的部分)。前者是「这里有插入」的直接证据,后者就是插入序列本身。还有一条弱信号:跨越断点的读段堆叠(coverage 的骤降或骤升),在两侧都不唯一时用它兜底。
2) Align and collect candidates. A long-read aligner (minimap2 map-hifi / map-ont) emits two signals: split alignments (one read cut into two pieces landing on either side of the same locus, with the middle unmapped) and soft clips (unmapped read ends). The first is direct evidence that an insertion exists, the second is the inserted sequence itself. A weaker third signal — coverage stacking across the breakpoint — is the fallback when neither flank is unique.
3)局部组装。 候选断点 ±100 bp 内通常有 5–20 条支持读段。把它们截出来做一次小规模一致性(spoa 或 abPOA 这类 partial-order alignment),得到的序列同时给出精确断点、插入序列与两侧的 TSD。这一步把「有插入」变成「插入是什么」,是精度的主要来源。
3) Local assembly. Around a candidate breakpoint (±100 bp) there are usually 5–20 supporting reads. Cut them out and build a small consensus (spoa or abPOA, that is, partial-order alignment); the result gives the exact breakpoint, the inserted sequence and the flanking TSD. This step turns “there is an insertion” into “here is the insertion” and is where most of the accuracy comes from.
4)分类与方向。 把组装出的插入序列比对回 TE 库(asm5 预设,或对 LTR 用 HMMER 找结构域),得到家族、亚家族、插入方向、5′/3′ 截断程度。截断与方向必须输出:一个 5′ 截断的 L1 和一个完整的 L1 在生物学上是两件事。
4) Classify and orient. Align the assembled insertion back to the TE library (asm5 preset, or an HMMER domain search for LTRs) to get family, subfamily, orientation and 5′/3′ truncation. Truncation and orientation must be emitted: a 5′-truncated L1 and a full-length one are different biological objects.
5)基因型与单倍型。 数「带插入的读段」与「只覆盖参考等位基因的读段」,比值就是等位分数;再用读段上的杂合位点做定相(whatshap),把插入分到父源或母源。这一步长读段优势最大:短读段只能给「有 / 无」,长读段能给「哪一条染色体上有」。
5) Genotype and phase. Count insertion-carrying reads against reads covering only the reference allele; the ratio is the allele fraction. Then phase with heterozygous sites on the same reads (whatshap) to assign each insertion to the paternal or maternal haplotype. This is where long reads shine: short reads give presence/absence, long reads give “on which chromosome”.
6)两个方向都要报。 同一套机器反过来跑:参考基因组里有一个 TE、样本里没有,就是一次缺失(TE deletion)。只报插入的工具会漏掉一半的结构变异。
6) Report both directions. Run the same machinery in reverse: a TE present in the reference but absent from the sample is a deletion. Tools that report only insertions miss half of the structural variation.
工程上还有几个决定成败的选择:
A few engineering choices decide success or failure:
| 决策 / choice | 选项 A / option A | 选项 B / option B | 代价 / cost |
|---|---|---|---|
| 索引 / index | 全 k-mer 哈希 | minimizer 采样 | 内存省 10×、灵敏度略降 |
| 候选 / candidates | 只用拆分比对 | 拆分 + 软剪切 + 覆盖度 | 召回升、假阳性升 |
| 精修 / refinement | 不做 | 局部一致性组装 | 时间 ×3、精度大幅升 |
| 分类 / classification | 比对库 | HMM 结构域 | 慢;对远端 LTR 更好 |
| 输出 / output | 只报插入 | 插入 + 缺失 + 未定家族 | 下游好用、实现更严 |
| 并行 / parallelism | 按染色体 | 按读段块 streaming | 省内存、需确定性合并 |
评价只有一条路:模拟。用已知的参考基因组,按真实分布(家族、长度、divergence、TSD、嵌套)注入插入,再按真实错误模型生成长读段,才有 ground truth 可以算召回与精确;然后用 GIAB 的 HG002 与 MELT 的 CEU 三人组做真实数据的外部校验。指标至少四个:断点 ±100 bp 的召回与精确、家族级准确率、基因型一致性、每小时处理的碱基数与峰值内存。消融必须做:去掉局部组装、去掉 TSD 检查、HiFi 换 ONT,各掉多少。
There is only one way to evaluate: simulation. Inject insertions into a known reference following realistic distributions (family, length, divergence, TSD, nesting), simulate long reads with a real error model, and you have ground truth for recall and precision; then validate on real data with GIAB’s HG002 and MELT’s CEU trio. Report at least four numbers: recall and precision at ±100 bp, family-level accuracy, genotype concordance, and bases per hour with peak RAM. Ablations are mandatory: drop local assembly, drop the TSD check, swap HiFi for ONT, and measure what each costs.
最后是失败模式,写工具的人必须提前想清楚:着丝粒与卫星阵列里的插入(两侧都不唯一)、嵌套 TE(一个元件插在另一个里)、L1 的 3′ 转导(插入末端带着一段独特的宿主序列,容易被误判成新家族)、参考偏好(带参考等位基因的读段比对得更好,导致缺失被低估)、以及库里没有的家族。
Finally the failure modes, which the author must think through in advance: insertions inside centromeric satellites (neither flank unique), nested TEs (an element inside another), L1 3′ transduction (the insertion ends in a unique stretch of host sequence and is easily mistaken for a new family), reference bias (reads carrying the reference allele align better, so deletions are underestimated), and families absent from the library.
七步做完,正好对应七个可以单独发表的贡献点;也正好解释了为什么这个领域有 41 个工具:每一格都有人做,但很少有人把七格一起做对。
Those seven steps are also seven things one could publish separately, and they explain why the field has 41 tools: every cell has someone working in it, but few people get all seven right at once.
17. 怎么选 / How to choose
flowchart TD
Q["我要回答什么?"] --> Q1{"TE 在哪里、属于哪类?"}
Q["我要回答什么?"] --> Q2{"哪些家族有表达?"}
Q["我要回答什么?"] --> Q3{"个体间哪些插入不同?"}
Q1 -->|有参考基因组| A1["RepeatMasker + 物种库<br/>无库先 EDTA / RepeatModeler2"]
Q1 -->|无参考| A2["RepeatExplorer2<br/>低覆盖读段图聚类"]
Q2 -->|bulk RNA-seq| B1["TEtranscripts / SQuIRE<br/>家族级 vs 位点级"]
Q2 -->|单细胞| B2["scTE"]
Q3 -->|短读段| C1["MELT / RetroSeq / Mobster"]
Q3 -->|混池| C2["PoPoolationTE2 / TEMP"]
Q3 -->|长读段| C3["TLDR / 直接比对"]
四条经验,都是从上面的结构里推出来的。第一,库决定上限。 RepeatMasker 再好,也只能找到库里有的东西;没有物种库时,先花时间做 EDTA 或 RepeatModeler2,比调 RepeatMasker 的参数有用得多。第二,结构工具应当「宽进严出」。 直接相信 LTRharvest 的默认输出会得到大量假阳性;正确用法是放宽阈值收集候选,再用 LTR_retriever 或人工规则收紧。第三,表达量只信家族级。 位点级数字是可辨识性不足时的后验分配,适合看趋势,不适合当定量结果发表。第四,长读段不是「更准的短读段」,而是换了问题。 它把推断变成观测,也让组装质量成为唯一的关键变量。
Four lessons follow from the structure above. First, the library sets the ceiling. However good RepeatMasker is, it can only find what the library contains; when no species library exists, time spent on EDTA or RepeatModeler2 buys far more than tuning RepeatMasker. Second, run structural tools loose, then filter hard. Trusting LTRharvest’s raw output yields many false positives; the right use is a permissive threshold followed by LTR_retriever or manual rules. Third, only trust family-level expression. Locus-level numbers are posterior allocations under weak identifiability — good for trends, not for publishing as quantities. Fourth, long reads are not “more accurate short reads”, they change the question. Inference becomes observation, and assembly quality becomes the only critical variable.
18. 常见的坑 / Pitfalls
| 坑 | 表现 | 对策 |
|---|---|---|
| 库里混进宿主基因 | 报出根本不是 TE 的家族 | RepeatClassifier + 人工删 |
| 共识嵌合或碎片化 | 家族数虚高、边界错位 | 多工具取交集 + curated 库 |
| 多映射读段被静默丢弃 | 表达量系统性偏低 | 检查 MAPQ 分布与未分配比例 |
| 位点级表达当成观测 | 结论无法重复 | 只报告家族级 + 敏感性分析 |
| 组装缺口让 LTR 断掉 | LAI 低、注释不全 | 先评估 LAI 再解读 |
| 版本漂移 | 三年前能跑今天不能 | 锁定库与工具版本并入库 |
| 依赖考古 | 装不上或跑一半崩 | 容器化 / 记录完整环境 |
| 染色体命名不一致 | 结果为空但无报错 | 统一 rename 并校验 |
19. 目录本身作为数据集 / The catalogue as a data set
| 工具 | 年份 | 语言 | 子领域 | 分辨率 | 引用 |
|---|---|---|---|---|---|
| RepeatMasker | 1996 | Perl | 注释 / annotation | 家族 / family | Smit 1996 |
| LTR_retriever | 2018 | Perl | 注释 / annotation | 家族 / family | Ou 2018 |
| EDTA | 2019 | Perl | 注释 / annotation | 家族 / family | Ou 2019 |
| Earl Grey | 2022 | Python | 注释 / annotation | 家族 / family | Baril 2022 |
| RECON | 2002 | C | 发现 / discovery | 家族 / family | Bao 2002 |
| RepeatScout | 2005 | C++ | 发现 / discovery | 家族 / family | Price 2005 |
| Piler | 2005 | C | 发现 / discovery | 家族 / family | Edgar 2005 |
| RepeatModeler2 | 2020 | Perl | 发现 / discovery | 家族 / family | Flynn 2020 |
| RepeatExplorer2 | 2020 | Python | 发现 / discovery | 家族 / family | Novak 2020 |
| McClintock | 2023 | Python | 发现 / discovery | 家族 / family | Nelson 2023 |
| LTR_FINDER | 2007 | C++ | 结构 / structure | 家族 / family | Xu 2007 |
| LTRharvest | 2008 | C | 结构 / structure | 家族 / family | Ellinghaus 2008 |
| LTRdigest | 2009 | C | 结构 / structure | 家族 / family | Steinbiss 2009 |
| MITE-Hunter | 2010 | Perl | 结构 / structure | 家族 / family | Han 2010 |
| HelitronScanner | 2014 | Java | 结构 / structure | 家族 / family | Xiong 2014 |
| SINE_Scan | 2017 | C++ | 结构 / structure | 家族 / family | Mao 2017 |
| TIR-Learner | 2019 | Python | 结构 / structure | 家族 / family | Su 2019 |
| TEclass | 2009 | C++ | 分类 / classification | 家族 / family | Abrusan 2009 |
| PASTEC | 2014 | Python | 分类 / classification | 家族 / family | Hoede 2014 |
| DeepTE | 2020 | Python | 分类 / classification | 家族 / family | Yan 2020 |
| TERL | 2021 | Python | 分类 / classification | 家族 / family | da Cruz 2021 |
| TransposonUltimate | 2022 | Python | 分类 / classification | 家族 / family | Riehl 2022 |
| TRF | 1999 | C | 卫星 / satellite | 位点 / locus | Benson 1999 |
| StainedGlass | 2019 | C++ | 卫星 / satellite | 位点 / locus | Vollger 2019 |
| ExpansionHunter | 2019 | C++ | 卫星 / satellite | 位点 / locus | Dolzhenko 2019 |
| HumAS-HMMER | 2022 | Python | 卫星 / satellite | 位点 / locus | Altemose 2022 |
| 工具 | 年份 | 语言 | 子领域 | 分辨率 | 引用 |
|---|---|---|---|---|---|
| TEtranscripts | 2015 | Python | 表达 / expression | 家族 / family | Jin 2015 |
| TEcount | 2015 | Python | 表达 / expression | 家族 / family | Jin 2015 |
| TEtools | 2017 | R | 表达 / expression | 家族 / family | Lerat 2017 |
| SalmonTE | 2018 | Python | 表达 / expression | 家族 / family | Jeong 2018 |
| SQuIRE | 2019 | Python | 表达 / expression | 位点 / locus | Yang 2019 |
| Telescope | 2019 | Python | 表达 / expression | 位点 / locus | Bendall 2019 |
| REdiscoverTE | 2019 | R | 表达 / expression | 家族 / family | Kong 2019 |
| L1EM | 2020 | Python | 表达 / expression | 位点 / locus | L1EM 软件 |
| scTE | 2021 | Python | 表达 / expression | 家族 / family | He 2021 |
| RetroSeq | 2013 | Perl | 插入 / insertion | 位点 / locus | Keane 2013 |
| TEMP | 2014 | Python | 插入 / insertion | 位点 / locus | Zhuang 2014 |
| PoPoolationTE2 | 2016 | Python | 插入 / insertion | 位点 / locus | Kofler 2016 |
| MELT | 2017 | Java | 插入 / insertion | 位点 / locus | Gardner 2017 |
| Mobster | 2017 | Java | 插入 / insertion | 位点 / locus | Kroon 2017 |
| TLDR | 2020 | C++ | 插入 / insertion | 位点 / locus | Ewing 2020 |
全表 41 个工具:注释 4、发现 6、结构 7、分类 5、表达 9、插入 6、卫星 4。语言分布:Python 18、C/C++ 12、Perl 6、Java 3、R 2。年份从 1996 到 2023。
41 tools in total: 4 annotation, 6 discovery, 7 structure, 5 classification, 9 expression, 6 insertion, 4 satellite. By language: Python 18, C/C++ 12, Perl 6, Java 3, R 2. Years run from 1996 to 2023.
这个目录当然不完整——每个子领域都还有十来个小工具没进来。它更像是一张用来定位的地图:当你拿到一个新的 TE 工具时,先问它落在哪一格(吃什么输入、给什么分辨率、用哪族方法),比读它的摘要快得多。
The catalogue is of course incomplete — every subfield has another dozen smaller tools. It is more like a map for orientation: when a new TE tool appears, asking which cell it lands in (what input, what resolution, which method family) is faster than reading the abstract.
20. 复现 / Reproducing
所有图都由两个 chunk 生成:catalog.csv 是唯一的数据源(41 行,包含工具名、年份、语言、子领域、输入、分辨率、方法、引用),图与表都是它的投影。想加一个工具,只需在 CSV 里加一行,所有计数与图会自动更新。
Every figure comes from two chunks with catalog.csv as the only data source (41 rows: tool, year, language, subfield, input, resolution, method, citation); figures and tables are projections of it. Adding a tool means adding a row, and every count and plot updates itself.
powershell -File .trae\skills\rblog-new-post\scripts\render-post.ps1 -Post "posts\2026-11-27 A Field Guide to Transposable Element Tools" -Fresh参考文献 / References
- Wicker, T., et al. (2007). A unified classification system for eukaryotic transposable elements. Nature Reviews Genetics 8, 973–982. doi:10.1038/nrg2165
- Bourque, G., et al. (2018). Ten things you should know about transposable elements. Genome Biology 19, 199. doi:10.1186/s13059-018-1577-z
- Goerner-Potvin, P., Bourque, G. (2018). Computational tools to unmask transposable elements. Nature Reviews Genetics 19, 688–704. doi:10.1038/s41576-018-0050-x
- Lander, E. S., et al. (2001). Initial sequencing and analysis of the human genome. Nature 409, 860–921. doi:10.1038/35057062
- Schnable, P. S., et al. (2009). The B73 maize genome: complexity, diversity, and dynamics. Science 326, 1112–1115. doi:10.1126/science.1178534
- International Wheat Genome Sequencing Consortium (2018). Shifting the limits in wheat research and breeding using a fully annotated reference genome. Science 361, eaar7191. doi:10.1126/science.aar7191
- Nurk, S., et al. (2022). The complete sequence of a human genome. Science 376, 44–53. doi:10.1126/science.abj6987
- Hoyt, S. J., et al. (2022). From telomere to telomere: the transcriptional and epigenetic state of human repeat elements. Science 376, eabk3112. doi:10.1126/science.abk3112
- Kazazian, H. H., Moran, J. V. (2017). Mobile DNA in health and disease. New England Journal of Medicine 377, 361–370. doi:10.1056/NEJMra1510092
- Chuong, E. B., Elde, N. C., Feschotte, C. (2017). Regulatory activities of transposable elements: from conflicts to benefits. Nature Reviews Genetics 18, 71–86. doi:10.1038/nrg.2016.139
- RepeatMasker — https://www.repeatmasker.org
- Dfam — https://dfam.org
- Flynn, J. M., et al. (2020). RepeatModeler2 for automated genomic discovery of transposable element families. PNAS 117, 9451–9457. doi:10.1073/pnas.1921046117
- Price, A. L., Jones, N. C., Pevzner, P. A. (2005). De novo identification of repeat families in large genomes. Bioinformatics 21, i351–i358. doi:10.1093/bioinformatics/bti517
- Bao, Z., Eddy, S. R. (2002). Automated de novo identification of repeat sequence families in sequenced genomes. Genome Research 12, 1269–1276. doi:10.1101/gr.282402
- Edgar, R. C., Myers, E. W. (2005). PILER: identification and classification of genomic repeats. BMC Bioinformatics 6 (Suppl 1), S1.(DOI 待核)
- Ellinghaus, D., Kurtz, S., Willhoeft, U. (2008). LTRharvest, an efficient and flexible software for de novo detection of LTR retrotransposons. BMC Bioinformatics 9, 18. doi:10.1186/1471-2105-9-18
- Xu, Z., Wang, H. (2007). LTR_FINDER: an efficient tool for the prediction of full-length LTR retrotransposons. Nucleic Acids Research 35, W265–W268. doi:10.1093/nar/gkm286
- Steinbiss, S., Willhoeft, U., Gremme, G., Kurtz, S. (2009). Fine-grained annotation and classification of de novo predicted LTR retrotransposons. Nucleic Acids Research 37, 7002–7013. doi:10.1093/nar/gkp759
- Han, Y., Wessler, S. R. (2010). MITE-Hunter: a program for discovering miniature inverted-repeat transposable elements from genomic sequences. Nucleic Acids Research 38, e199. doi:10.1093/nar/gkq569
- Ou, S., Jiang, N. (2018). LTR_retriever: a highly accurate and sensitive program for identification of long terminal repeat retrotransposons. Plant Physiology 176, 1410–1422. doi:10.1104/pp.17.01355
- Ou, S., et al. (2019). Benchmarking transposable element annotation methods for creation of a streamlined, comprehensive pipeline. Genome Biology 20, 275. doi:10.1186/s13059-019-1905-2
- Su, W., Gu, X., Peterson, T. (2019). TIR-Learner, a new ensemble method for TIR transposable element annotation, provides new insights into element diversity in plant genomes. Molecular Plant 12, 239–254. doi:10.1016/j.molp.2019.01.011
- Xiong, W., et al. (2014). HelitronScanner uncovers a large overlooked cache of Helitron transposons in many plant genomes. PNAS 111, 10263–10268.(DOI 待核)
- Mao, H., Wang, H. (2017). SINE_Scan: an efficient tool to discover short interspersed nuclear elements (SINEs) in large-scale genomic datasets. Bioinformatics 33, 743–745. doi:10.1093/bioinformatics/btw579
- Hoede, C., et al. (2014). PASTEC: an automatic transposable element classification tool. Mobile DNA 5, 2.(DOI 待核)
- Abrusán, G., Grundmann, N., DeMester, L., Makalowski, W. (2009). TEclass—a tool for automated classification of unknown eukaryotic transposable elements. Bioinformatics 25, 1329–1330. doi:10.1093/bioinformatics/btp084
- Yan, H., Bombarely, A., Li, S. (2020). DeepTE: a computational method for de novo classification of transposons with convolutional neural network. Bioinformatics 36, 4269–4275.(DOI 待核)
- da Cruz, M. H. P., et al. (2021). TERL: classification of transposable elements by convolutional neural networks. Briefings in Bioinformatics 22, bbaa185.(DOI 待核)
- Riehl, K., et al. (2022). TransposonUltimate: software for transposon classification, annotation and detection. Nucleic Acids Research 50, e64.(DOI 待核)
- Jin, Y., Tam, O. H., Paniagua, E., Hammell, M. (2015). TEtranscripts: a package for including transposable elements in differential expression analysis of RNA-seq datasets. Bioinformatics 31, 3593–3599. doi:10.1093/bioinformatics/btv413
- Lerat, E., et al. (2017). TEtools facilitates big data expression analysis of transposable elements and reveals an antagonism between their activity and that of piRNA genes. Nucleic Acids Research 45, e17.(DOI 待核)
- Jeong, H.-H., et al. (2018). An ultra-fast and scalable quantification pipeline for transposable elements from next generation sequencing data. Pacific Symposium on Biocomputing 23, 168–179.(DOI 待核)
- Yang, W. R., Ardeljan, D., Pacyna, C. N., Payer, L. M., Burns, K. H. (2019). SQuIRE reveals locus-specific regulation of interspersed repeat expression. Nucleic Acids Research 47, e27. doi:10.1093/nar/gky1301
- Bendall, M. L., et al. (2019). Telescope: characterization of the retrotranscriptome by accurate estimation of transposable element expression. PLoS Computational Biology 15, e1006453.(DOI 待核)
- Kong, Y., et al. (2019). REdiscoverTE: scalable quantification of transposable element RNA and their interactions with regulatory machinery. Genome Biology 20, 251.(DOI 待核)
- He, J., et al. (2021). Identifying transposable element expression dynamics and heterogeneity during development at the single-cell level with a processing pipeline scTE. Nature Communications 12, 1456.(DOI 待核)
- Gardner, E. J., et al. (2017). The Mobile Element Locator Tool (MELT): population-scale mobile element discovery and biology. Genome Research 27, 1916–1929. doi:10.1101/gr.218032.116
- Keane, T. M., Wong, K., Adams, D. J. (2013). RetroSeq: transposable element discovery from next-generation sequencing data. Bioinformatics 29, 389–390.(DOI 待核)
- Kroon, M., et al. (2017). Mobster: accurate detection of mobile element insertions in next generation sequencing data. Genome Biology 18, 197.(DOI 待核)
- Kofler, R., Gómez-Sánchez, D., Schlötterer, C. (2016). PoPoolationTE2: comparative population genomics of transposable elements using Pool-Seq. Molecular Biology and Evolution 33, 2759–2764.(DOI 待核)
- Zhuang, J., Wang, J., Theurkauf, W., Weng, Z. (2014). TEMP: a computational method for analyzing transposable element polymorphism in populations. Nucleic Acids Research 42, 6826–6838.(DOI 待核)
- Ewing, A. D. (2020). TLDR: transposable element detection from long-read sequencing data.(工具论文,DOI 待核)
- Baril, T., Imrie, R. M., Hayward, A. (2022). Earl Grey: a fully automated user-friendly transposable element annotation and analysis pipeline. Mobile DNA 13, 15.(DOI 待核)
- Nelson, M. G., et al. (2023). McClintock: an integrated pipeline for transposable element discovery, annotation and classification.(DOI 待核)
- Vollger, M. R., et al. (2019). StainedGlass: interactive visualization of tandem repeat structures.(软件,DOI 待核)
- Altemose, N., et al. (2022). Complete genomic and epigenetic maps of human centromeres. Science 376, eabl4178. doi:10.1126/science.abl4178
- Benson, G. (1999). Tandem repeats finder: a program to analyze DNA sequences. Nucleic Acids Research 27, 573–580. doi:10.1093/nar/27.2.573
- Dolzhenko, E., et al. (2019). ExpansionHunter: a sequence-graph-based tool to analyze variation in short tandem repeat regions. Genome Biology 20, 246. doi:10.1186/s13059-019-1842-9
- L1EM — 位点级 L1 定量工具(软件,DOI 待核)
- Novák, P., et al. (2020). RepeatExplorer2: a novel computational tool for repetitive genome analysis. PLoS ONE 15, e0227438. doi:10.1371/journal.pone.0227438
- L1EM 与其它位点级 L1 工具的实现细节见其仓库 README(本文未运行,故不引具体版本)。
关于引用:带 DOI 的条目为期刊论文,页码与 DOI 已尽量核对;标「待核」的是软件论文或我无法确认 DOI 的条目,只保留作者、年份、期刊,不给可能出错的 DOI。工具主页见正文链接。
A note on citations: entries with a DOI are journal articles whose pages and DOI were checked as far as possible; entries marked 待核 are software papers or cases where the DOI could not be confirmed, so only author, year and journal are given rather than a possibly wrong DOI. Tool homepages are linked in the text.




